import i18n from './language/i18n'
export const matchFileSuffixType = (val, type) => {
  const suffix = val.substring(val.lastIndexOf('.') + 1, val.length)
  let result = null
  if (type === 'video') result = ['mp4', 'm2v', 'mkv'].some((item) => item === suffix)
  else result = ['png', 'jpg', 'jpeg', 'bmp', 'gif'].some((item) => item === suffix)
  return result
}
export const cameraList = [
  { id: '1', code: i18n.t('lan.yes') },
  { id: '2', code: i18n.t('lan.no') },
]
export const stepList = [
  { code: 1, value: i18n.t('lan.Master') },
  { code: 2, value: i18n.t('lan.cabinet1') },
  { code: 3, value: i18n.t('lan.color') },
  { code: 4, value: i18n.t('lan.other') },
  { code: 5, value: i18n.t('lan.payment') },
]
export const colorList = [
  { id: '1', code: '红色', value: '#d80000' },
  { id: '2', code: '橙色', value: '#dd6f2a' },
  { id: '3', code: '蓝色', value: '#157bc3' },
  { id: '4', code: '灰色', value: '#cfd0d0' },
  { id: '5', code: '白色', value: '#fff' },
  { id: '6', code: '深灰色', value: '#646262' },
  { id: '7', code: '棕色', value: '#9a9488' },
  { id: '8', code: '深蓝色', value: '#0d3e6b' },
  { id: '9', code: '黑色', value: '#000' },
  { id: '10', code: '黄色', value: '#f8f903' },
]
export const documentType = [
  { id: '1', code: i18n.t('lan.card') },
  // { id: '2', code: '出入境登记证' },
  { id: '3', code: i18n.t('lan.passport') },
]
export const invoiceList = [
  { id: '1', code: '无需发票' },
  { id: '2', code: '电子普通票-个人抬头' },
  { id: '3', code: '电子普通票-企业抬头' },
]
export const payType = [
  { id: '1', code: i18n.t('lan.online') },
  { id: '2', code: i18n.t('lan.offline') },
]
